home *** CD-ROM | disk | FTP | other *** search
- Path: pop.gnn.com!PLayton
- From: PLayton@gnn.com (Pam Layton)
- Newsgroups: comp.lang.c++
- Subject: Class problem
- Date: Tue, 27 Feb 1996 10:08:45
- Organization: APCO, Inc.
- Message-ID: <4gv6j2$klv@news-e2b.gnn.com>
- NNTP-Posting-Host: www-33-67.gnn.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset="us-ascii"
- X-GNN-NewsServer-Posting-Date: 27 Feb 1996 15:05:06 GMT
- X-Mailer: GNNmessenger 1.2
-
- Hi. I'm new at C++ programming. I am working on a program (that
- is to be complete by 2/28/96). I have to have one class of name
- information, and one class of address information. I have a menu
- to choose whether to add, display, remove or exit. I have most of
- the code written. My problem: I use Borland C++ ver. 3.1. It
- keeps giving me an error saying "Illegal Structure Operation" on
- these two lines:
- cin >> addr.zip;
- cin >> addr.phone;
-
- Both of these fields are listed within my address class. I have it
- listed as:
- class addr_data:public name_data
- {
- public:
- char street[25];
- char city[15];
- char state[3];
- int zip[11];
- int phone[10];
- }addr;
-
- Can someone please tell me what is wrong with this picture? I
- appreciate it.
-
- Pam
-
-
-